package com.shop.trade.api.api;

import com.shop.common.model.PayCallMdel;
import com.shop.common.model.param.trade.OrderPayInput;
import com.shop.common.util.excption.UserNotFoundException;
import com.shop.trade.api.model.StatisModel;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description:
 *
 * @author zhoulk
 * @date: 2019年04月05日  18:38
 */
@RequestMapping("/trade/pay")
public interface IPayApi {

    /**
     * @Function com.shop.trade.api.api.IPayApi.qryPayOrders
     * @Description //TODO 账单列表
     *
     * @param: input
     * @param: request
     * @return java.lang.String
     * @errorCode //TODO
     *
     * @Author zhoulk
     * @Date 2019/4/18 13:57
     *
     **/
    @GetMapping("/payOrders")
    String qryPayOrders(OrderPayInput input, HttpServletRequest request) throws UserNotFoundException;

    /**
     * @Function com.shop.trade.api.api.IPayApi.qryPayOrderStatis
     * @Description //TODO 账单统计数据
     *
     * @param: input
     * @param: request
     * @return java.lang.String
     * @errorCode //TODO
     *
     * @Author zhoulk
     * @Date 2019/4/18 13:56
     *
     **/
    @PostMapping("/statis")
    String qryPayOrderStatis(@RequestBody OrderPayInput input, HttpServletRequest request) throws UserNotFoundException;

    /**
     * @Function com.shop.trade.api.api.IPayApi.qryPayOderStatisList
     * @Description //TODO 账单统计列表
     *
     * @param: statisModel
     * @param: request
     * @return java.lang.String
     * @errorCode //TODO
     *
     * @Author zhoulk
     * @Date 2019/4/18 13:56
     *
     **/
    @PostMapping("/statisList")
    String qryPayOderStatisList(@RequestBody StatisModel statisModel, HttpServletRequest request) throws UserNotFoundException;

    @GetMapping("/pay/validate")
    String payValidate(Integer orderId, Boolean isBalance);

    /**
     * @Function com.shop.trade.api.api.IPayApi.payResultValidate
     * @Description //TODO 支付成功后校验
     *
     * @param: payCallMdel
     * @param: request
     * @return java.lang.String
     * @errorCode //TODO
     *
     * @Author zhoulk
     * @Date 2019/4/18 10:43
     *
     **/
    @PostMapping("/result/validate")
    String payResultValidate(@RequestBody PayCallMdel payCallMdel, HttpServletRequest request) throws UserNotFoundException;

    @PostMapping("/result/validate2")
    String payResultValidate2(@RequestBody PayCallMdel payCallMdel, HttpServletRequest request) throws UserNotFoundException;

}
